package com.pattern.once.singleton;

public class TestMain {

    public static void main(String[] args) {
        SingletonDemo singletonDemo2 =SingletonDemo.getSingletonDemo();

        singletonDemo2.setName("11111111111111111");

        SingletonDemo singletonDemo3 = SingletonDemo.getSingletonDemo();
        SingletonDemo singletonDemo4 =  SingletonDemo.getSingletonDemo();
        SingletonDemo singletonDemo5 =  SingletonDemo.getSingletonDemo();
        SingletonDemo singletonDemo6 =  SingletonDemo.getSingletonDemo();
        singletonDemo3.setName("333333333333333");
        System.out.println(singletonDemo2.getName());
        System.out.println(singletonDemo3.getName());
        System.out.println(singletonDemo4.getName());
        System.out.println(singletonDemo5.getName());
        System.out.println(singletonDemo6.getName());


    }

}
